package regex;
//正则表达式
//1.校验 字符串 是否满足规则
//2.在一段文本中查找想要的内容

import java.util.Scanner;

/**
 * @Author 28021
 * @Date 2022/11/19
 */
public class Qq {
    public static void main(String[] args) {
        String qq="1248515897";
        Scanner in = new Scanner(System.in);
//        System.out.println(qq.matches("[1-9]\\d{5,19}"));
        System.out.println("\"\"");
        System.out.println("333".matches("\\d{3}"));

        System.out.println("请输入手机号码");
        String num = in.next();
        System.out.println(num.matches("\\d{11}"));

        System.out.println("请输入QQ邮箱：");
        String mail = in.next();
        System.out.println(mail.matches("\\d{6,20}@qq[.]com"));
        System.out.println(mail.matches("\\d{6,20}@qq\\.com"));
        String r1 = "(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
        System.out.println(r1);


    }
}
